﻿using System.Collections.Generic;
using System;

namespace DBProvider.Providers
{
	public interface ICourseProvider
	{
		List<CourseCategory> GetAllCourseCategory();
		List<Course> GetCourseByCategory(int theCrsCateID, int drugStoreID);
		List<Course> GetCourseByCategory(int theCrsCateID, int drugStoreID, int pageIndex, int pageSize, out int totalRecords);
		Course GetCourse(int theCourseID);
		Course CreateCourse(Course theNewCourse, out string msg);
		bool DeleteCourse(int theCourseID);
		bool UpDateCourse(Course theCourse);
		CourseCategory CreateCrsCategory(CourseCategory theCrsCat);
		bool DeleteCourseCateogry(int theCrsCatID);
		bool UpdateCourseCategory(CourseCategory theCrsCat);
		List<Course> GetCourseByUser(int userID);

		List<CourseChapter> GetCourseChapterByCourse(int courseID);
		CourseChapter CreateCourseChapter(CourseChapter theNewCourseChapter, out string msg);
		bool DeleteCourseChapter(int courseChapterID);
		CourseChapter GetCourseChapter(int courseChapterID);

		List<Course> GetCourseByCourseIDs(List<int> courseIDs);

		void AddRLTUserAndCourse(List<RLT_USERANDCOURCE> lstUserAndCourse);
		List<RLT_USERANDCOURCE> GetRLTUserAndCourseByUser(int userID);

		List<CourseWare> GetAllCourseWare(int drugStoreID);
		CourseWare GetCourseWare(int theCourseWareID);
		CourseWare CreateCourseWare(CourseWare theNewCourseWare, out string msg);
		bool UpdateCourseWare(CourseWare theCourseWare);
		bool DeleteCourseWare(int theCourseWareID);
		bool DeleteCourseWare(List<int> ids);
		bool UpdateRLT_UserAndCourse(RLT_USERANDCOURCE theRLT_UserAndCourse);
		List<RLT_USERANDCOURCE> GetRLT_UserAndCourseByUser(int userID, DateTime operateTimeStart, DateTime operateTimeEnd);

		List<Course> GetNewCourse(int count, int drugstoreID);

		List<RLT_CourseAndShareTo> GetCourseAndShareToByCourse(int courseID);
		void CreateCourseAndShareTo(List<RLT_CourseAndShareTo> lstCourseAndShareTo);
		void SaveCourseAndShareTo(int courseID, List<RLT_CourseAndShareTo> lstCourseAndShareTo);

		List<Course> GetCourseByCategory(int userID, int theCrsCateID, int drugStoreID, int pageIndex, int pageSize, out int totalRecords);

		List<Course> GetNewCourse(int count, int drugstoreID, int userID);
		List<Course> GetNewCourseByCategory(int userID, int theCrsCateID, int drugStoreID, int count);
		List<Course> GetNewCourseByCategory(int theCrsCateID, int drugStoreID, int count);

		List<RLT_CourseWareAndShareTo> GetCourseWareAndShareToByCourse(int courseWareID);
		void CreateCourseWareAndShareTo(List<RLT_CourseWareAndShareTo> lstCourseWareAndShareTo);
		void SaveCourseWareAndShareTo(int courseWareID, List<RLT_CourseWareAndShareTo> lstCourseWareAndShareTo);

		List<CourseWare> GetAllCourseWare(int userID, int drugStoreID);
	}
}
